<!doctype html>
<html lang="zh-CN" data-theme="light">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="generator" content="VuePress 2.0.0-rc.0" />
    <meta name="theme" content="VuePress Theme Hope 2.0.0-rc.10" />
    <style>
      html {
        background: var(--bg-color, #fff);
      }

      html[data-theme="dark"] {
        background: var(--bg-color, #1d1e1f);
      }

      body {
        background: var(--bg-color);
      }
    </style>
    <script>
      const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
      const systemDarkMode =
        window.matchMedia &&
        window.matchMedia("(prefers-color-scheme: dark)").matches;

      if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
        document.documentElement.setAttribute("data-theme", "dark");
      }
    </script>
    <meta property="og:url" content="https://hylexus.github.io/jt-framework-docs-dashboard/guide/quick-start/quick-start.html"><meta property="og:site_name" content="jt-framework-dashboard(Beta)"><meta property="og:title" content="快速开始"><meta property="og:description" content="此处将展示一个 最少配置 的 JT-Dashboard 服务的搭建。 传送门 本小节的示例可以在 jt-framework-samples-maven (https://github.com/hylexus/jt-framework-samples-maven/tree/master/samples-with-dashboard) 下找到对应代码。 搭..."><meta property="og:type" content="article"><meta property="og:locale" content="zh-CN"><meta property="og:updated_time" content="2023-10-04T14:10:45.000Z"><meta property="article:author" content="hylexus"><meta property="article:modified_time" content="2023-10-04T14:10:45.000Z"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"快速开始","image":[""],"dateModified":"2023-10-04T14:10:45.000Z","author":[{"@type":"Person","name":"hylexus","url":"https://github.com/hylexus"}]}</script><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><meta name="application-name" content="jt808"><meta name="theme-color" content="#3eaf7c"><title>快速开始 | jt-framework-dashboard(Beta)</title><meta name="description" content="此处将展示一个 最少配置 的 JT-Dashboard 服务的搭建。 传送门 本小节的示例可以在 jt-framework-samples-maven (https://github.com/hylexus/jt-framework-samples-maven/tree/master/samples-with-dashboard) 下找到对应代码。 搭...">
    <link rel="preload" href="/jt-framework-docs-dashboard/assets/style-e6RyMkrY.css" as="style"><link rel="stylesheet" href="/jt-framework-docs-dashboard/assets/style-e6RyMkrY.css">
    <link rel="modulepreload" href="/jt-framework-docs-dashboard/assets/app-_ikmOmvi.js"><link rel="modulepreload" href="/jt-framework-docs-dashboard/assets/quick-start.html-mbAuiOYx.js"><link rel="modulepreload" href="/jt-framework-docs-dashboard/assets/quick-start.html-KaqE5JT2.js"><link rel="modulepreload" href="/jt-framework-docs-dashboard/assets/plugin-vue_export-helper-x3n3nnut.js">
    <link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-X2CDpjIy.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/about.html-pw24s7w7.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-oOKszXBj.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-SY1MEWJl.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-aEmh2sIj.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/intro.html-UtTDMehV.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/terminology.html-yFqSPU6L.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/404.html-S4wHWjm5.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-h9plCfPQ.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/about.html-aOC0y2up.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-iPQHwpf-.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-09MSyLcS.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/index.html-9QHRj84X.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/intro.html--zV1QuQt.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/terminology.html-hW2r5ZiK.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/404.html-oe7QixCv.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/photoswipe.esm-08_zHRDQ.js" as="script"><link rel="prefetch" href="/jt-framework-docs-dashboard/assets/SearchResult-BnrSi7Bf.js" as="script">
  </head>
  <body>
    <div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content" class="vp-skip-link sr-only">跳至主要內容</a><!--]--><!--[--><div class="theme-container has-toc"><!--[--><header id="navbar" class="vp-navbar"><div class="vp-navbar-start"><button type="button" class="vp-toggle-sidebar-button" title="Toggle Sidebar"><span class="icon"></span></button><!--[--><!----><!--]--><!--[--><a class="vp-link vp-brand vp-brand" href="/jt-framework-docs-dashboard/"><img class="vp-nav-logo" src="/jt-framework-docs-dashboard/logo.png" aria-hidden><!----><span class="vp-site-name hide-in-pad">jt-framework-dashboard(Beta)</span></a><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-center"><!--[--><!----><!--]--><!--[--><nav class="vp-nav-links"><div class="nav-item hide-in-mobile"><a aria-label="指南" class="vp-link nav-link active nav-link active" href="/jt-framework-docs-dashboard/guide/"><span class="font-icon icon iconfont icon-creative" style=""></span>指南<!----></a></div><div class="nav-item hide-in-mobile"><a aria-label="配置" class="vp-link nav-link nav-link" href="/jt-framework-docs-dashboard/config/"><span class="font-icon icon iconfont icon-setting" style=""></span>配置<!----></a></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button type="button" class="dropdown-title" aria-label="生态"><span class="title"><span class="font-icon icon iconfont icon-app" style=""></span>生态</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a href="https://hylexus.gitee.io/jt-framework-docs-808/" rel="noopener noreferrer" target="_blank" aria-label="jt-framework-JT/T 808" class="nav-link"><!---->jt-framework-JT/T 808<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://hylexus.gitee.io/jt-framework-docs-1078/" rel="noopener noreferrer" target="_blank" aria-label="jt-framework-JT/T 1078(Beta)" class="nav-link"><!---->jt-framework-JT/T 1078(Beta)<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://hylexus.gitee.io/jt-framework-docs-dashboard/" rel="noopener noreferrer" target="_blank" aria-label="jt-framework-dashboard(Beta)" class="nav-link"><!---->jt-framework-dashboard(Beta)<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li></ul></button></div></div><div class="nav-item hide-in-mobile"><a href="https://hylexus.gitee.io/jt-framework-docs-808/v2/release-notes/latest.html" rel="noopener noreferrer" target="_blank" aria-label="发版记录" class="nav-link"><span class="font-icon icon iconfont icon-branch" style=""></span>发版记录<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="nav-item hide-in-mobile"><a href="https://hylexus.gitee.io/jt-framework-docs-808/thanks.html" rel="noopener noreferrer" target="_blank" aria-label="致谢" class="nav-link"><span class="font-icon icon iconfont icon-share" style=""></span>致谢<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="nav-item hide-in-mobile"><a href="https://hylexus.gitee.io/jt-framework-docs-808/about.html" rel="noopener noreferrer" target="_blank" aria-label="关于我们" class="nav-link"><span class="font-icon icon iconfont icon-home" style=""></span>关于我们<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div></nav><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-end"><!--[--><!----><!--]--><!--[--><!----><div class="nav-item vp-repo"><a class="vp-repo-link" href="https://github.com/hylexus/jt-framework" target="_blank" rel="noopener noreferrer" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="icon github-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="github icon" style="width:1.25rem;height:1.25rem;vertical-align:middle;"><path d="M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"></path></svg></a></div><!----><div class="nav-item hide-in-mobile"><button type="button" class="outlook-button" tabindex="-1" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" class="icon outlook-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="outlook icon"><path d="M224 800c0 9.6 3.2 44.8 6.4 54.4 6.4 48-48 76.8-48 76.8s80 41.6 147.2 0 134.4-134.4 38.4-195.2c-22.4-12.8-41.6-19.2-57.6-19.2C259.2 716.8 227.2 761.6 224 800zM560 675.2l-32 51.2c-51.2 51.2-83.2 32-83.2 32 25.6 67.2 0 112-12.8 128 25.6 6.4 51.2 9.6 80 9.6 54.4 0 102.4-9.6 150.4-32l0 0c3.2 0 3.2-3.2 3.2-3.2 22.4-16 12.8-35.2 6.4-44.8-9.6-12.8-12.8-25.6-12.8-41.6 0-54.4 60.8-99.2 137.6-99.2 6.4 0 12.8 0 22.4 0 12.8 0 38.4 9.6 48-25.6 0-3.2 0-3.2 3.2-6.4 0-3.2 3.2-6.4 3.2-6.4 6.4-16 6.4-16 6.4-19.2 9.6-35.2 16-73.6 16-115.2 0-105.6-41.6-198.4-108.8-268.8C704 396.8 560 675.2 560 675.2zM224 419.2c0-28.8 22.4-51.2 51.2-51.2 28.8 0 51.2 22.4 51.2 51.2 0 28.8-22.4 51.2-51.2 51.2C246.4 470.4 224 448 224 419.2zM320 284.8c0-22.4 19.2-41.6 41.6-41.6 22.4 0 41.6 19.2 41.6 41.6 0 22.4-19.2 41.6-41.6 41.6C339.2 326.4 320 307.2 320 284.8zM457.6 208c0-12.8 12.8-25.6 25.6-25.6 12.8 0 25.6 12.8 25.6 25.6 0 12.8-12.8 25.6-25.6 25.6C470.4 233.6 457.6 220.8 457.6 208zM128 505.6C128 592 153.6 672 201.6 736c28.8-60.8 112-60.8 124.8-60.8-16-51.2 16-99.2 16-99.2l316.8-422.4c-48-19.2-99.2-32-150.4-32C297.6 118.4 128 291.2 128 505.6zM764.8 86.4c-22.4 19.2-390.4 518.4-390.4 518.4-22.4 28.8-12.8 76.8 22.4 99.2l9.6 6.4c35.2 22.4 80 12.8 99.2-25.6 0 0 6.4-12.8 9.6-19.2 54.4-105.6 275.2-524.8 288-553.6 6.4-19.2-3.2-32-19.2-32C777.6 76.8 771.2 80 764.8 86.4z"></path></svg><div class="outlook-dropdown"><!----></div></button></div><!--[--><button type="button" class="search-pro-button" aria-label="搜索"><svg xmlns="http://www.w3.org/2000/svg" class="icon search-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="search icon"><path d="M192 480a256 256 0 1 1 512 0 256 256 0 0 1-512 0m631.776 362.496-143.2-143.168A318.464 318.464 0 0 0 768 480c0-176.736-143.264-320-320-320S128 303.264 128 480s143.264 320 320 320a318.016 318.016 0 0 0 184.16-58.592l146.336 146.368c12.512 12.48 32.768 12.48 45.28 0 12.48-12.512 12.48-32.768 0-45.28"></path></svg><div class="search-pro-placeholder">搜索</div><div class="search-pro-key-hints"><kbd class="search-pro-key">Ctrl</kbd><kbd class="search-pro-key">K</kbd></div></button><!--]--><!--]--><!--[--><!----><!--]--><button type="button" class="vp-toggle-navbar-button" aria-label="Toggle Navbar" aria-expanded="false" aria-controls="nav-screen"><span><span class="vp-top"></span><span class="vp-middle"></span><span class="vp-bottom"></span></span></button></div></header><!----><!--]--><!----><div class="toggle-sidebar-wrapper"><span class="arrow start"></span></div><aside id="sidebar" class="vp-sidebar"><!--[--><!----><!--]--><ul class="vp-sidebar-links"><li><section class="vp-sidebar-group"><button class="vp-sidebar-heading clickable active" type="button"><span class="font-icon icon iconfont icon-launch" style=""></span><span class="vp-sidebar-title">入门</span><span class="vp-arrow down"></span></button><ul class="vp-sidebar-links"><li><!--[--><a aria-label="介绍" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/jt-framework-docs-dashboard/guide/quick-start/intro.html"><span class="font-icon icon iconfont icon-proposal" style=""></span>介绍<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="快速开始" class="vp-link nav-link active vp-sidebar-link vp-sidebar-page active nav-link active vp-sidebar-link vp-sidebar-page active" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html"><span class="font-icon icon iconfont icon-launch" style=""></span>快速开始<!----></a><ul class="vp-sidebar-sub-headers"><li class="vp-sidebar-sub-header"><a aria-label="搭建服务端" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#搭建服务端"><!---->搭建服务端<!----></a><ul class="vp-sidebar-sub-headers"><li class="vp-sidebar-sub-header"><a aria-label="依赖" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#依赖"><!---->依赖<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="配置" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#配置"><!---->配置<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="启动服务端" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#启动服务端"><!---->启动服务端<!----></a><ul class="vp-sidebar-sub-headers"></ul></li></ul></li><li class="vp-sidebar-sub-header"><a aria-label="配置客户端(JT/T 808)" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#配置客户端-jt-t-808"><!---->配置客户端(JT/T 808)<!----></a><ul class="vp-sidebar-sub-headers"><li class="vp-sidebar-sub-header"><a aria-label="添加依赖" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#添加依赖"><!---->添加依赖<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="添加配置" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#添加配置"><!---->添加配置<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="启动客户端" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#启动客户端"><!---->启动客户端<!----></a><ul class="vp-sidebar-sub-headers"></ul></li></ul></li><li class="vp-sidebar-sub-header"><a aria-label="配置客户端(JT/T 1078)" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#配置客户端-jt-t-1078"><!---->配置客户端(JT/T 1078)<!----></a><ul class="vp-sidebar-sub-headers"><li class="vp-sidebar-sub-header"><a aria-label="添加依赖" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#添加依赖-1"><!---->添加依赖<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="添加配置" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#添加配置-1"><!---->添加配置<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="启动客户端" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#启动客户端-1"><!---->启动客户端<!----></a><ul class="vp-sidebar-sub-headers"></ul></li></ul></li><li class="vp-sidebar-sub-header"><a aria-label="验证" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/jt-framework-docs-dashboard/guide/quick-start/quick-start.html#验证"><!---->验证<!----></a><ul class="vp-sidebar-sub-headers"></ul></li></ul><!--]--></li><li><!--[--><a aria-label="基本术语" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/jt-framework-docs-dashboard/guide/quick-start/terminology.html"><span class="font-icon icon iconfont icon-proposal" style=""></span>基本术语<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li></ul></section></li></ul><!--[--><!----><!--]--></aside><!--[--><main id="main-content" class="vp-page"><!--[--><!--[--><!----><!--]--><!----><nav class="vp-breadcrumb disable"></nav><div class="vp-page-title"><h1><span class="font-icon icon iconfont icon-launch" style=""></span>快速开始</h1><div class="page-info"><span class="page-author-info" aria-label="作者🖊" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon author-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="author icon"><path d="M649.6 633.6c86.4-48 147.2-144 147.2-249.6 0-160-128-288-288-288s-288 128-288 288c0 108.8 57.6 201.6 147.2 249.6-121.6 48-214.4 153.6-240 288-3.2 9.6 0 19.2 6.4 25.6 3.2 9.6 12.8 12.8 22.4 12.8h704c9.6 0 19.2-3.2 25.6-12.8 6.4-6.4 9.6-16 6.4-25.6-25.6-134.4-121.6-240-243.2-288z"></path></svg><span><a class="page-author-item" href="https://github.com/hylexus" target="_blank" rel="noopener noreferrer">hylexus</a></span><span property="author" content="hylexus"></span></span><!----><span class="page-date-info" aria-label="写作日期📅" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon calendar-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="calendar icon"><path d="M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z"></path></svg><span><!----></span><meta property="datePublished" content="2023-10-04T14:10:45.000Z"></span><!----><!----><span class="page-word-info" aria-label="字数🔠" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon word-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="word icon"><path d="M518.217 432.64V73.143A73.143 73.143 0 01603.43 1.097a512 512 0 01419.474 419.474 73.143 73.143 0 01-72.046 85.212H591.36a73.143 73.143 0 01-73.143-73.143z"></path><path d="M493.714 566.857h340.297a73.143 73.143 0 0173.143 85.577A457.143 457.143 0 11371.566 117.76a73.143 73.143 0 0185.577 73.143v339.383a36.571 36.571 0 0036.571 36.571z"></path></svg><span>约 1000 字</span><meta property="wordCount" content="1000"></span><span class="page-reading-time-info" aria-label="阅读时间⌛" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon timer-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="timer icon"><path d="M799.387 122.15c4.402-2.978 7.38-7.897 7.38-13.463v-1.165c0-8.933-7.38-16.312-16.312-16.312H256.33c-8.933 0-16.311 7.38-16.311 16.312v1.165c0 5.825 2.977 10.874 7.637 13.592 4.143 194.44 97.22 354.963 220.201 392.763-122.204 37.542-214.893 196.511-220.2 389.397-4.661 5.049-7.638 11.651-7.638 19.03v5.825h566.49v-5.825c0-7.379-2.849-13.981-7.509-18.9-5.049-193.016-97.867-351.985-220.2-389.527 123.24-37.67 216.446-198.453 220.588-392.892zM531.16 450.445v352.632c117.674 1.553 211.787 40.778 211.787 88.676H304.097c0-48.286 95.149-87.382 213.728-88.676V450.445c-93.077-3.107-167.901-81.297-167.901-177.093 0-8.803 6.99-15.793 15.793-15.793 8.803 0 15.794 6.99 15.794 15.793 0 80.261 63.69 145.635 142.01 145.635s142.011-65.374 142.011-145.635c0-8.803 6.99-15.793 15.794-15.793s15.793 6.99 15.793 15.793c0 95.019-73.789 172.82-165.96 177.093z"></path></svg><span>大约 3 分钟</span><meta property="timeRequired" content="PT3M"></span></div><hr></div><div class="toc-place-holder"><aside id="toc"><!--[--><!----><!--]--><div class="toc-header">此页内容<button type="button" class="print-button" title="打印"><svg xmlns="http://www.w3.org/2000/svg" class="icon print-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="print icon"><path d="M819.2 364.8h-44.8V128c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v236.8h-44.8C145.067 364.8 96 413.867 96 473.6v192c0 59.733 49.067 108.8 108.8 108.8h44.8V896c0 17.067 14.933 32 32 32h460.8c17.067 0 32-14.933 32-32V774.4h44.8c59.733 0 108.8-49.067 108.8-108.8v-192c0-59.733-49.067-108.8-108.8-108.8zM313.6 160h396.8v204.8H313.6V160zm396.8 704H313.6V620.8h396.8V864zM864 665.6c0 25.6-19.2 44.8-44.8 44.8h-44.8V588.8c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v121.6h-44.8c-25.6 0-44.8-19.2-44.8-44.8v-192c0-25.6 19.2-44.8 44.8-44.8h614.4c25.6 0 44.8 19.2 44.8 44.8v192z"></path></svg></button></div><div class="toc-wrapper"><ul class="toc-list"><!--[--><li class="toc-item"><a class="vp-link toc-link level2 toc-link level2" href="#搭建服务端">搭建服务端</a></li><li><ul class="toc-list"><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#依赖">依赖</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#配置">配置</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#启动服务端">启动服务端</a></li><!----><!--]--></ul></li><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level2 toc-link level2" href="#配置客户端-jt-t-808">配置客户端(JT/T 808)</a></li><li><ul class="toc-list"><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#添加依赖">添加依赖</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#添加配置">添加配置</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#启动客户端">启动客户端</a></li><!----><!--]--></ul></li><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level2 toc-link level2" href="#配置客户端-jt-t-1078">配置客户端(JT/T 1078)</a></li><li><ul class="toc-list"><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#添加依赖-1">添加依赖</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#添加配置-1">添加配置</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#启动客户端-1">启动客户端</a></li><!----><!--]--></ul></li><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level2 toc-link level2" href="#验证">验证</a></li><!----><!--]--></ul><div class="toc-marker" style="top:-1.7rem;"></div></div><!--[--><!----><!--]--></aside></div><!--[--><!----><!--]--><div class="theme-hope-content"><h1 id="快速开始" tabindex="-1"><a class="header-anchor" href="#快速开始" aria-hidden="true">#</a> 快速开始</h1><p>此处将展示一个 最少配置 的 <code>JT-Dashboard</code> 服务的搭建。</p><div class="hint-container tip"><p class="hint-container-title">传送门</p><p>本小节的示例可以在 <a href="https://github.com/hylexus/jt-framework-samples-maven/tree/master/samples-with-dashboard" target="_blank" rel="noopener noreferrer">jt-framework-samples-maven<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 下找到对应代码。</p></div><h2 id="搭建服务端" tabindex="-1"><a class="header-anchor" href="#搭建服务端" aria-hidden="true">#</a> 搭建服务端</h2><h3 id="依赖" tabindex="-1"><a class="header-anchor" href="#依赖" aria-hidden="true">#</a> 依赖</h3><h4 id="spring-boot-2-x" tabindex="-1"><a class="header-anchor" href="#spring-boot-2-x" aria-hidden="true">#</a> spring-boot-2.x</h4><div class="hint-container warning"><p class="hint-container-title">注意</p><p><code>jt-framework-dashboard</code> 目前只支持 <code>spring-boot-3.x</code> 版本。后续会支持 <code>spring-boot-2.x</code> 版本。</p></div><h4 id="spring-boot-3-x" tabindex="-1"><a class="header-anchor" href="#spring-boot-3-x" aria-hidden="true">#</a> spring-boot-3.x</h4><p>使用 <code>spring-boot-3.x</code> 的项目引入 <code>jt-dashboard-server-spring-boot-starter</code></p><div class="vp-code-tabs"><div class="vp-code-tabs-nav" role="tablist"><button type="button" class="vp-code-tab-nav" role="tab" aria-controls="codetab-31-0" aria-selected="false">maven</button><button type="button" class="vp-code-tab-nav active" role="tab" aria-controls="codetab-31-1" aria-selected="true">gradle</button></div><!--[--><div class="vp-code-tab" id="codetab-31-0" role="tabpanel" aria-expanded="false"><div class="vp-code-tab-title">maven</div><!--[--><div class="language-xml line-numbers-mode" data-ext="xml"><pre class="language-xml"><code>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependency</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>io.github.hylexus.jt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>jt-dashboard-server-spring-boot-starter<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>2.2.0-beta3<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependency</span><span class="token punctuation">&gt;</span></span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><!--]--></div><div class="vp-code-tab active" id="codetab-31-1" role="tabpanel" aria-expanded="true"><div class="vp-code-tab-title">gradle</div><!--[--><div class="language-groovy line-numbers-mode" data-ext="groovy"><pre class="language-groovy"><code>implementation <span class="token string">&#39;io.github.hylexus.jt:jt-dashboard-server-spring-boot-starter:2.2.0-beta3&#39;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><!--]--></div><!--]--></div><h3 id="配置" tabindex="-1"><a class="header-anchor" href="#配置" aria-hidden="true">#</a> 配置</h3><ul><li>application.yml</li></ul><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="language-yaml"><code><span class="token key atrule">server</span><span class="token punctuation">:</span>
  <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">9090</span>

<span class="token key atrule">spring</span><span class="token punctuation">:</span>
  <span class="token key atrule">jackson</span><span class="token punctuation">:</span>
    <span class="token key atrule">time-zone</span><span class="token punctuation">:</span> Asia/Shanghai

<span class="token key atrule">logging</span><span class="token punctuation">:</span>
  <span class="token key atrule">level</span><span class="token punctuation">:</span>
    <span class="token key atrule">root</span><span class="token punctuation">:</span> info
    <span class="token key atrule">io.github.hylexus.jt.dashboard.server.registry</span><span class="token punctuation">:</span> debug
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="启动服务端" tabindex="-1"><a class="header-anchor" href="#启动服务端" aria-hidden="true">#</a> 启动服务端</h3><h2 id="配置客户端-jt-t-808" tabindex="-1"><a class="header-anchor" href="#配置客户端-jt-t-808" aria-hidden="true">#</a> 配置客户端(JT/T 808)</h2><h3 id="添加依赖" tabindex="-1"><a class="header-anchor" href="#添加依赖" aria-hidden="true">#</a> 添加依赖</h3><div class="hint-container tip"><p class="hint-container-title">提示</p><ul><li>假设你已经有一个正常运行的 <strong>808</strong> 项目</li><li><code>spring-boot-starter-webflux</code> 和 <code>spring-boot-starter-web</code> 两个依赖任选其一</li><li>然后再给该项目添加 <code>jt-dashboard-client-spring-boot-starter</code> 依赖</li></ul></div><h4 id="spring-boot-2-x-1" tabindex="-1"><a class="header-anchor" href="#spring-boot-2-x-1" aria-hidden="true">#</a> spring-boot-2.x</h4><div class="hint-container warning"><p class="hint-container-title">注意</p><p><code>jt-framework-dashboard</code> 目前只支持 <code>spring-boot-3.x</code> 版本。后续会支持 <code>spring-boot-2.x</code> 版本。</p></div><h4 id="spring-boot-3-x-1" tabindex="-1"><a class="header-anchor" href="#spring-boot-3-x-1" aria-hidden="true">#</a> spring-boot-3.x</h4><p>使用 <code>spring-boot-3.x</code> 的项目引入 <code>jt-dashboard-client-spring-boot-starter</code></p><div class="vp-code-tabs"><div class="vp-code-tabs-nav" role="tablist"><button type="button" class="vp-code-tab-nav" role="tab" aria-controls="codetab-92-0" aria-selected="false">maven</button><button type="button" class="vp-code-tab-nav active" role="tab" aria-controls="codetab-92-1" aria-selected="true">gradle</button></div><!--[--><div class="vp-code-tab" id="codetab-92-0" role="tabpanel" aria-expanded="false"><div class="vp-code-tab-title">maven</div><!--[--><div class="language-xml line-numbers-mode" data-ext="xml"><pre class="language-xml"><code>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependency</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>io.github.hylexus.jt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>jt-dashboard-client-spring-boot-starter<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>2.2.0-beta3<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependency</span><span class="token punctuation">&gt;</span></span>

</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><!--]--></div><div class="vp-code-tab active" id="codetab-92-1" role="tabpanel" aria-expanded="true"><div class="vp-code-tab-title">gradle</div><!--[--><div class="language-groovy line-numbers-mode" data-ext="groovy"><pre class="language-groovy"><code>implementation <span class="token string">&#39;io.github.hylexus.jt:jt-dashboard-client-spring-boot-starter:2.2.0-beta3&#39;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><!--]--></div><!--]--></div><h3 id="添加配置" tabindex="-1"><a class="header-anchor" href="#添加配置" aria-hidden="true">#</a> 添加配置</h3><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="language-yaml"><code><span class="token key atrule">server</span><span class="token punctuation">:</span>
  <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">808</span>

<span class="token key atrule">jt-dashboard</span><span class="token punctuation">:</span>
  <span class="token key atrule">client</span><span class="token punctuation">:</span>
    <span class="token key atrule">jt808</span><span class="token punctuation">:</span>
      <span class="token key atrule">enabled</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">name</span><span class="token punctuation">:</span> $<span class="token punctuation">{</span>spring.application.name<span class="token punctuation">}</span>
      <span class="token comment">## dashboard-server 服务端地址(配置内网地址即可)</span>
      <span class="token comment">## 808 服务会将自己注册到 dashboard-server</span>
      <span class="token key atrule">server-url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//localhost<span class="token punctuation">:</span><span class="token number">9090</span>
      <span class="token comment">## dashboard-server 主动调用该地址(配置内网地址即可)</span>
      <span class="token key atrule">base-url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//localhost<span class="token punctuation">:</span><span class="token number">808</span>
      <span class="token key atrule">metadata</span><span class="token punctuation">:</span>
        <span class="token comment">## 随意配置</span>
        <span class="token key atrule">role</span><span class="token punctuation">:</span> 808<span class="token punctuation">-</span>server
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="启动客户端" tabindex="-1"><a class="header-anchor" href="#启动客户端" aria-hidden="true">#</a> 启动客户端</h3><p>启动之后查看日志：</p><ul><li>正常注册到 <code>dashboard-server</code> 时会有类似下面的日志输出：</li></ul><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>2024-01-06 23:57:50.819  INFO 80830 --- [ient-scheduler1] .c.r.i.r.DefaultJtApplicationRegistrator:60 - Application registered itself as 214315538d40
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><ul><li>注册失败时，看具体原因。比如下面这个输出是由于 <code>dashboard-server</code> 未启动导致的：</li></ul><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>2024-01-06 23:59:28.838  WARN 80927 --- [ient-scheduler1] .c.r.i.r.DefaultJtApplicationRegistrator:67 - Failed to register application as Jt808Application() at jt-dashboard-server ([http://localhost:9090]): null. Further attempts are logged on DEBUG level
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="配置客户端-jt-t-1078" tabindex="-1"><a class="header-anchor" href="#配置客户端-jt-t-1078" aria-hidden="true">#</a> 配置客户端(JT/T 1078)</h2><h3 id="添加依赖-1" tabindex="-1"><a class="header-anchor" href="#添加依赖-1" aria-hidden="true">#</a> 添加依赖</h3><div class="hint-container tip"><p class="hint-container-title">提示</p><ul><li>假设你已经有一个正常运行的 <strong>1078</strong> 项目</li><li><code>spring-boot-starter-webflux</code> 和 <code>spring-boot-starter-web</code> 两个依赖任选其一</li><li>然后再给该项目添加 <code>jt-dashboard-client-spring-boot-starter</code> 依赖</li></ul></div><h4 id="spring-boot-2-x-2" tabindex="-1"><a class="header-anchor" href="#spring-boot-2-x-2" aria-hidden="true">#</a> spring-boot-2.x</h4><div class="hint-container warning"><p class="hint-container-title">注意</p><p><code>jt-framework-dashboard</code> 目前只支持 <code>spring-boot-3.x</code> 版本。后续会支持 <code>spring-boot-2.x</code> 版本。</p></div><h4 id="spring-boot-3-x-2" tabindex="-1"><a class="header-anchor" href="#spring-boot-3-x-2" aria-hidden="true">#</a> spring-boot-3.x</h4><p>使用 <code>spring-boot-3.x</code> 的项目引入 <code>jt-dashboard-client-spring-boot-starter</code></p><div class="vp-code-tabs"><div class="vp-code-tabs-nav" role="tablist"><button type="button" class="vp-code-tab-nav" role="tab" aria-controls="codetab-165-0" aria-selected="false">maven</button><button type="button" class="vp-code-tab-nav active" role="tab" aria-controls="codetab-165-1" aria-selected="true">gradle</button></div><!--[--><div class="vp-code-tab" id="codetab-165-0" role="tabpanel" aria-expanded="false"><div class="vp-code-tab-title">maven</div><!--[--><div class="language-xml line-numbers-mode" data-ext="xml"><pre class="language-xml"><code>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependency</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>io.github.hylexus.jt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>jt-dashboard-client-spring-boot-starter<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>2.2.0-beta3<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependency</span><span class="token punctuation">&gt;</span></span>

</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><!--]--></div><div class="vp-code-tab active" id="codetab-165-1" role="tabpanel" aria-expanded="true"><div class="vp-code-tab-title">gradle</div><!--[--><div class="language-groovy line-numbers-mode" data-ext="groovy"><pre class="language-groovy"><code>implementation <span class="token string">&#39;io.github.hylexus.jt:jt-dashboard-client-spring-boot-starter:2.2.0-beta3&#39;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><!--]--></div><!--]--></div><h3 id="添加配置-1" tabindex="-1"><a class="header-anchor" href="#添加配置-1" aria-hidden="true">#</a> 添加配置</h3><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="language-yaml"><code><span class="token comment"># spring 原生配置</span>
<span class="token key atrule">server</span><span class="token punctuation">:</span>
  <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">1078</span>

<span class="token key atrule">jt-dashboard</span><span class="token punctuation">:</span>
  <span class="token key atrule">client</span><span class="token punctuation">:</span>
    <span class="token key atrule">jt1078</span><span class="token punctuation">:</span>
      <span class="token key atrule">enabled</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">name</span><span class="token punctuation">:</span> $<span class="token punctuation">{</span>spring.application.name<span class="token punctuation">}</span>
      <span class="token comment">## dashboard-server 服务端地址(配置内网地址即可)</span>
      <span class="token comment">## 1078 服务会将自己注册到 dashboard-server</span>
      <span class="token key atrule">server-url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//localhost<span class="token punctuation">:</span><span class="token number">9090</span>
      <span class="token comment">## dashboard-server 会主动调用这个地址(配置内网地址即可)</span>
      <span class="token key atrule">base-url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//localhost<span class="token punctuation">:</span>$<span class="token punctuation">{</span>server.port<span class="token punctuation">}</span>
      <span class="token key atrule">metadata</span><span class="token punctuation">:</span>
        <span class="token comment">## 随意配置</span>
        <span class="token key atrule">role</span><span class="token punctuation">:</span> 1078<span class="token punctuation">-</span>server
      <span class="token comment">## 这个地址一定要配置成公网地址(或者说是终端可以访问的地址，音视频码流会往这个地址发送)</span>
      <span class="token comment">## 这个地址一定要配置成公网地址(或者说是终端可以访问的地址，音视频码流会往这个地址发送)</span>
      <span class="token comment">## 这个地址一定要配置成公网地址(或者说是终端可以访问的地址，音视频码流会往这个地址发送)</span>
      <span class="token key atrule">host</span><span class="token punctuation">:</span> 1.1.1.1
      <span class="token comment">## 和 jt1078.server.port 的配置保持一致</span>
      <span class="token key atrule">tcp-port</span><span class="token punctuation">:</span> $<span class="token punctuation">{</span>jt1078.server.port<span class="token punctuation">}</span>
      <span class="token comment">## 和 server.port 的配置保持一致</span>
      <span class="token key atrule">http-port</span><span class="token punctuation">:</span> $<span class="token punctuation">{</span>server.port<span class="token punctuation">}</span>

</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="启动客户端-1" tabindex="-1"><a class="header-anchor" href="#启动客户端-1" aria-hidden="true">#</a> 启动客户端</h3><p>启动之后查看日志：</p><ul><li>正常注册到 <code>dashboard-server</code> 时会有类似下面的日志输出：</li></ul><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>2024-01-07 00:22:17.941  INFO 81759 --- [ient-scheduler1] .c.r.i.r.DefaultJtApplicationRegistrator:60 - Application registered itself as 33c2c9d7955f
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><ul><li>注册失败时，看具体原因。比如下面这个输出是由于 <code>dashboard-server</code> 未启动导致的：</li></ul><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>2024-01-07 00:22:45.968  WARN 81783 --- [ient-scheduler1] .c.r.i.r.DefaultJtApplicationRegistrator:67 - Failed to register application as Jt1078Application(host=1.1.1.1, httpPort=1078, tcpPort=61078) at jt-dashboard-server ([http://localhost:9090]): null. Further attempts are logged on DEBUG level
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="验证" tabindex="-1"><a class="header-anchor" href="#验证" aria-hidden="true">#</a> 验证</h2></div><!--[--><!----><!--]--><footer class="page-meta"><div class="meta-item edit-link"><a href="https://github.com/hylexus/jt-framework/edit/main/docs/guide/quick-start/quick-start.md" rel="noopener noreferrer" target="_blank" aria-label="在 GitHub 上编辑此页" class="nav-link label"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon edit-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="edit icon"><path d="M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"></path><path d="M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"></path></svg><!--]-->在 GitHub 上编辑此页<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="meta-item git-info"><div class="update-time"><span class="label">上次编辑于: </span><!----></div><div class="contributors"><span class="label">贡献者: </span><!--[--><!--[--><span class="contributor" title="email: hylexus@163.com">hylexus</span><!--]--><!--]--></div></div></footer><nav class="vp-page-nav"><a aria-label="介绍" class="vp-link nav-link prev nav-link prev" href="/jt-framework-docs-dashboard/guide/quick-start/intro.html"><div class="hint"><span class="arrow start"></span>上一页</div><div class="link"><span class="font-icon icon iconfont icon-proposal" style=""></span>介绍</div></a><a aria-label="基本术语" class="vp-link nav-link next nav-link next" href="/jt-framework-docs-dashboard/guide/quick-start/terminology.html"><div class="hint">下一页<span class="arrow end"></span></div><div class="link">基本术语<span class="font-icon icon iconfont icon-proposal" style=""></span></div></a></nav><!----><!--[--><!----><!--]--><!--]--></main><!--]--><footer class="vp-footer-wrapper"><div class="vp-footer"><a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">备案号: 沪ICP备2022029946号-2</a ></div><!----></footer></div><!--]--><!--]--><!----><!----><!--]--></div>
    <script type="module" src="/jt-framework-docs-dashboard/assets/app-_ikmOmvi.js" defer></script>
  </body>
</html>
